package com.aplink.generic.pojo;

import com.aplink.generic.constant.SqlDataType;
import com.aplink.generic.util.objectrule.ValueBaseRule;

public class ObjPropInfo {

    private boolean isAccountId;
    private boolean isAccountPass;
    private boolean isAuto;
    private boolean isFKey;
    private boolean isKey;
    private String mPrimaryObjectMapping;
    private String mDataType;
    private String mSort;
    private String mForeignKeyId;
    private String mForeignObjectMappingId;
    private String mObjectMappingId;
    private String mObjectPropertyId;
    private String mPropertyName;
    public ValueBaseRule valueBaseRule;

    public ObjPropInfo() {

    }

    public SqlDataType getDataType() {
        return SqlDataType.get( mDataType );
    }

    /**
     * This property mapping for "iskey" attribute.
     *
     * @return
     */
    public String getFKeyID() {
        return this.mForeignKeyId;
    }

    /**
     * This property mapping for "f_om_id" attribute.
     *
     * @return
     */
    public String getForeignObjectMapping() {
        return this.mForeignObjectMappingId;
    }

    /**
     * This property mapping for "om_id" attribute.
     *
     * @return
     */
    public String getObjectMapping() {
        return this.mObjectMappingId;
    }

    /**
     * This property mapping for "op_id" attribute.
     *
     * @return
     */
    public String getObjectProperty() {
        return this.mObjectPropertyId;
    }

    /**
     * This property mapping for "property_name" attribute.
     *
     * @return
     */
    public String getPropertyName() {
        return this.mPropertyName;
    }

    public ValueBaseRule getValueBaseRule() {
        return this.valueBaseRule;
    }

    public boolean isAccountId() {
        return this.isAccountId;
    }

    public boolean isAccountPass() {
        return this.isAccountPass;
    }

    public boolean isAuto() {
        return this.isAuto;
    }

    public boolean isFKey() {
        return this.isFKey;
    }

    public boolean isKey() {
        return this.isKey;
    }

    public void setAccountId( boolean isAccountId ) {
        this.isAccountId = isAccountId;
    }

    public void setAccountPass( boolean isAccountPass ) {
        this.isAccountPass = isAccountPass;
    }

    public void setDataType( String datatype ) {
        this.mDataType = datatype;
    }

    public void setFKey( boolean isFKey ) {
        this.isFKey = isFKey;
    }

    public void setForiegnKey( String fkeyid ) {
        this.mForeignKeyId = fkeyid;
    }

    public void setIsAuto( boolean isAuto ) {
        this.isAuto = isAuto;
    }

    public void setKey( boolean isKey ) {
        this.isKey = isKey;
    }

    public void setForeignObjectMapping( String mFOm ) {
        this.mForeignObjectMappingId = mFOm;
    }

    public void setObjectMapping( String om ) {
        this.mObjectMappingId = om;
    }

    public void setObjectProperty( String opid ) {
        this.mObjectPropertyId = opid;
    }

    public void setPropName( String propname ) {
        this.mPropertyName = propname;
    }

    public String getSort() {
        return mSort;
    }

    public void setSort( String sort ) {
        this.mSort = sort;
    }

    public boolean isSort() {
        return mSort != null;
    }

    /**
     * This property mapping for "p_om_id" attribute.
     *
     * @return
     */
    public String getPrimaryObjectMapping() {
        return mPrimaryObjectMapping;
    }

    public void setPrimaryObjectMapping( String primaryObjectMapping ) {
        mPrimaryObjectMapping = primaryObjectMapping;
    }
}
